<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>3-axios的POST和PUT请求传参</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>

    <style></style>
  </head>
  <body>
    <div id="app"></div>
    <script>
      axios
        .post('http://www.localhost:3000/axios', {
          uname: 'zs',
          pwd: 123456,
        })
        .then(function (res) {
          console.log(res.data); //axios - post:zs=============123456
        });

      axios
        .put('http://www.localhost:3000/axios/123', {
          uname: 'ls',
          pwd: 666666,
        })
        .then(function (res) {
          // console.log(res.data);/axios - put:123====ls====666666
        });
    </script>
  </body>
</html>
